package com.alexgaoyh.weixin.util;

public class WeixinHeadImgUtilss {

	public static String getUniqueUrl(String headimgurl) {
		return headimgurl.replaceFirst("http://wx.qlogo.cn/mmopen/", "").replace("/0", "");
	}
	
	public static String getAllHeadImgUrl(String uniqueUrl) {
		StringBuffer sBufferStr = new StringBuffer("http://wx.qlogo.cn/mmopen/" + uniqueUrl + "/0");
		return sBufferStr.toString();
	}
	
	public static void main(String[] args) {
		String uniqueUrl = getUniqueUrl("http://wx.qlogo.cn/mmopen/asdfsdfsdferwer2w354423tfs/0");
		System.out.println(uniqueUrl);
		
		System.out.println(getAllHeadImgUrl(uniqueUrl));
	}
}
